using System;
using System.Xml.Serialization;
using System.Collections.Generic;

namespace Aop.Api.Domain
{
    /// <summary>
    /// InvoiceApplyModel Data Structure.
    /// </summary>
    [Serializable]
    public class InvoiceApplyModel : AopObject
    {
        /// <summary>
        /// 支付宝交易流水号
        /// </summary>
        [XmlElement("alipay_trade_no")]
        public string AlipayTradeNo { get; set; }

        /// <summary>
        /// 扩展字段
        /// </summary>
        [XmlElement("extend_fields")]
        public string ExtendFields { get; set; }

        /// <summary>
        /// 发票内容项
        /// </summary>
        [XmlArray("invoice_content")]
        [XmlArrayItem("invoice_item_content")]
        public List<InvoiceItemContent> InvoiceContent { get; set; }

        /// <summary>
        /// 普票/专票
        /// </summary>
        [XmlElement("invoice_kind")]
        public string InvoiceKind { get; set; }

        /// <summary>
        /// 发票开具操作人
        /// </summary>
        [XmlElement("invoice_operator")]
        public string InvoiceOperator { get; set; }

        /// <summary>
        /// 发票抬头
        /// </summary>
        [XmlElement("invoice_title")]
        public InvoiceTitleModel InvoiceTitle { get; set; }

        /// <summary>
        /// 仅用于冲红，原始蓝票发票代码
        /// </summary>
        [XmlElement("original_blue_invoice_code")]
        public string OriginalBlueInvoiceCode { get; set; }

        /// <summary>
        /// 仅用于冲红，原始蓝票发票号码
        /// </summary>
        [XmlElement("original_blue_invoice_no")]
        public string OriginalBlueInvoiceNo { get; set; }

        /// <summary>
        /// 发起开票申请唯一id，需要全局唯一
        /// </summary>
        [XmlElement("out_apply_id")]
        public string OutApplyId { get; set; }

        /// <summary>
        /// 申请开票对应的交易流水号，该流水号必须保证唯一
        /// </summary>
        [XmlElement("out_biz_no")]
        public string OutBizNo { get; set; }

        /// <summary>
        /// 开票卖家名称
        /// </summary>
        [XmlElement("register_name")]
        public string RegisterName { get; set; }

        /// <summary>
        /// 卖家纳税人识别号，不可为空串
        /// </summary>
        [XmlElement("register_no")]
        public string RegisterNo { get; set; }

        /// <summary>
        /// 发票日期，用户填写，目前精确到日
        /// </summary>
        [XmlElement("trade_date")]
        public string TradeDate { get; set; }

        /// <summary>
        /// 交易总金额，用于计算发票开具的加税合计金额，要求：大于0且精确到小数点两位，以元为单位。
        /// </summary>
        [XmlElement("trade_total_amount")]
        public string TradeTotalAmount { get; set; }

        /// <summary>
        /// 支付宝用户id
        /// </summary>
        [XmlElement("user_id")]
        public string UserId { get; set; }
    }
}
